using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NCT.Framework;

namespace VISS.API.Users {

    /// <summary>
    /// Value of Message Type
    /// </summary>
    public enum EUserMessageType : byte {
        /// <summary>
        /// 
        /// </summary>
        Unknown = 0,
        /// <summary>
        /// 
        /// </summary>
        User = 1,
        /// <summary>
        /// This type of message from the system
        /// </summary>
        System = 2
    }

    /// <summary>
    /// Value of Message Status
    /// </summary>
    public enum EUserMessageStatus : byte {
        /// <summary>
        /// 
        /// </summary>
        UnRead = 0,
        /// <summary>
        /// 
        /// </summary>
        Read = 1,
        /// <summary>
        /// 
        /// </summary>
        Unknown = 2
    }

    /// <summary>
    /// Contains info about message between two users
    /// </summary>
    [Serializable]
	public class UserMessageEnt {

		#region Properties

        /// <summary>
        /// Gets or sets the ID.
        /// </summary>
        /// <value>The ID.</value>
		public long ID { get; set; }
        /// <summary>
        /// Gets or sets the conversation ID.
        /// </summary>
        /// <value>The conversation ID.</value>
        public long ConversationID { get; set; }
        /// <summary>
        /// Gets or sets the sent user key.
        /// </summary>
        /// <value>The sent user key.</value>
		public string SentUserKey { get; set; }

        /// <summary>
        /// These field is only used for displaying extend data
        /// </summary>
        public string SenderName { get; set; }
        /// <summary>
        /// These field is only used for displaying extend data
        /// </summary>
        public EUserGender SenderGender { get; set; }
        /// <summary>
        /// These field is only used for displaying extend data
        /// </summary>
        public string SenderAvatarFileName { get; set; }
        /// <summary>
        /// These field is only used for displaying extend data
        /// </summary>
        public int SenderAvatarImageStoreID { get; set; }
        /// <summary>
        /// These field is only used for displaying extend data
        /// </summary>
        public EUserAvatarStatus SenderAvatarStatus { get; set; }

        /// <summary>
        /// Gets or sets the received user key.
        /// </summary>
        /// <value>The received user key.</value>
		public string ReceivedUserKey { get; set; }
        /// <summary>
        /// Gets or sets the title.
        /// </summary>
        /// <value>The title.</value>
		public string Title { get; set; }
        /// <summary>
        /// Gets or sets the content.
        /// </summary>
        /// <value>The content.</value>
		public string Content { get; set; }
        /// <summary>
        /// Gets or sets the status.
        /// </summary>
        /// <value>The status.</value>
        public EUserMessageStatus Status { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public EUserMessageType Type { get; set; }
        /// <summary>
        /// Gets or sets a value indicating whether [sender deleted].
        /// </summary>
        /// <value><c>true</c> if [sender deleted]; otherwise, <c>false</c>.</value>
        public bool SenderDeleted { get; set; }
        /// <summary>
        /// Gets or sets a value indicating whether [receiver deleted].
        /// </summary>
        /// <value><c>true</c> if [receiver deleted]; otherwise, <c>false</c>.</value>
        public bool ReceiverDeleted { get; set; }
        /// <summary>
        /// Gets or sets the date created.
        /// </summary>
        /// <value>The date created.</value>
		public DateTime DateCreated { get; set; }

		#endregion

		#region Constructors

        /// <summary>
        /// Initializes a new instance of the <see cref="UserMessageEnt"/> class.
        /// </summary>
		public UserMessageEnt() {
			ID = 0;
            ConversationID = 0;
			SentUserKey = string.Empty;
            SenderName = string.Empty;
            SenderGender = EUserGender.Unknown;
            SenderAvatarFileName = string.Empty;
            SenderAvatarImageStoreID = 0;
            SenderAvatarStatus = EUserAvatarStatus.Available;
			ReceivedUserKey = string.Empty;
			Title = string.Empty;
			Content = string.Empty;
            Status = EUserMessageStatus.Unknown;
			Type = EUserMessageType.Unknown;
            SenderDeleted = false;
            ReceiverDeleted = false;
			DateCreated = DateTimeUtils.MinValue;
		}

		#endregion
	}
}